package com.example.demo.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @_PackageName:com.example.demo.controller
 * @_ClassName:UserController
 * @_Description:
 * @_Author：笑老二
 * @_data 2020/12/27 13:19
 */
@Controller
public class UserController {

    @RequestMapping("index")
    public String index() {
        return "index";
    }

    @RequestMapping("toLogin")
    public String toLogin() {
        return "views/login";
    }


    @RequestMapping("level1/{id}")
    public String leve1(@PathVariable int id) {
        return "views/level1/" + id;
    }

    @RequestMapping("level2/{id}")
    public String leve2(@PathVariable int id) {
        return "views/level2/" + id;
    }

    @RequestMapping("level3/{id}")
    public String leve3(@PathVariable int id) {
        return "views/level3/" + id;
    }

}
